<?php

namespace Core;

class View extends \Core\Urclass {

    protected $views = array();

    public function __construct() {
        parent::__construct(__CLASS__);
    }

    public function addView($view, $data = null) {
        $this->views[] = array(
            'view' => $view,
            'data' => $data);
    }

    public function printView() {
        foreach($this->views as $viewKey) {
            $data = $viewKey['data'];
            include('views/' . $viewKey['view']);
        }
    }
}